#define  _CRT_SECURE_NO_WARNINGS
#include<assert.h>
#include <stdio.h>
int main()
{
    int a = 0;
    scanf("%d", &a);
    int arr[a][a];
    for (int i = 0;i < a;i++)
    {
        for (int j = 0;j <= i;j++)
        {
            if (j == 0 || i == j)
            {
                arr[i][j] = 1;
            }
            else
            {
                arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
            }
        }
    }
    for (int i = 0;i < a;i++)
    {
        for (int j = 0;j <= i;j++)
        {
            printf("%5d", arr[i][j]);
        }
        printf("\n");
    }
    return 0;
}